package com.itheima.ai.dto;

import lombok.Data;
import org.springframework.ai.tool.annotation.ToolParam;

import java.util.List;

/**
 * 查询课程的数据传输实体类
 *
 * @Author mr.wu
 * @Date 2025-11-6 9:24
 */
@Data
public class CourseQueryDTO {

    @ToolParam(required = false, description = "学历背景要求：0-无，1-初中，2-高中、3-大专、4-本科以上")
    private String edu;

    @ToolParam(required = false, description = "课程类型：编程、设计、自媒体、其它")
    private String type;

    @ToolParam(required = false, description = "排序方式：如果用户提到课程价格，field就是price、isAsc就是true；如果用户提到课程时长，field就是duration、isAsc就是true")
    private List<Sort> sorts;

    @Data
    public static class Sort{

        @ToolParam(required = false, description = "排序字段：price或duration")
        private String field;

        @ToolParam(required = false, description = "排序方向：true或false")
        private Boolean isAsc;
    }
}
